import Aes256 from "../utils/Aes256.js";

// 动态加密秘钥 (学而博客系统,后台开发者管理中获取)
let secret = "";

const aes256 = new Aes256({
  key: secret,
  iv: secret,
});

export default (() => {
  let token = 0;
  return () => {
    token += 1;
    return aes256.encrypt({
      key: secret,
      date: `${Date.now()}${token}`,
    });
  };
})();
